import Vue from 'vue'
import Router from 'vue-router'

//page
import index from '@/pages/index/index.vue'
import car from '@/pages/car/car.vue'
import classify from '@/pages/classify/classify.vue'

//products
import productInfo from '@/products/productInfo/productInfo.vue'
Vue.use(Router)


export default new Router({
    routes: [
        {
            //重定向
            path: '*',
            redirect: '/index'
        },
        {
            path: '/index',
            name: 'index',
            component: index
        },
        {
            path: '/car',
            name: 'car',
            component: car
        },
        {
            path: '/classify',
            name: 'classify',
            component: classify
        },
        {
            path: '/productInfo',
            name: 'productInfo',
            component: productInfo
        }
    ]
})